import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/list_problem_collect_entity.dart';

ListProblemCollectEntity $ListProblemCollectEntityFromJson(Map<String, dynamic> json) {
	final ListProblemCollectEntity listProblemCollectEntity = ListProblemCollectEntity();
	final List<ListProblemCollectContent>? content = jsonConvert.convertListNotNull<ListProblemCollectContent>(json['content']);
	if (content != null) {
		listProblemCollectEntity.content = content;
	}
	final int? pageNum = jsonConvert.convert<int>(json['pageNum']);
	if (pageNum != null) {
		listProblemCollectEntity.pageNum = pageNum;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		listProblemCollectEntity.pageSize = pageSize;
	}
	final int? totalPages = jsonConvert.convert<int>(json['totalPages']);
	if (totalPages != null) {
		listProblemCollectEntity.totalPages = totalPages;
	}
	final int? totalSize = jsonConvert.convert<int>(json['totalSize']);
	if (totalSize != null) {
		listProblemCollectEntity.totalSize = totalSize;
	}
	return listProblemCollectEntity;
}

Map<String, dynamic> $ListProblemCollectEntityToJson(ListProblemCollectEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['content'] =  entity.content?.map((v) => v.toJson()).toList();
	data['pageNum'] = entity.pageNum;
	data['pageSize'] = entity.pageSize;
	data['totalPages'] = entity.totalPages;
	data['totalSize'] = entity.totalSize;
	return data;
}

ListProblemCollectContent $ListProblemCollectContentFromJson(Map<String, dynamic> json) {
	final ListProblemCollectContent listProblemCollectContent = ListProblemCollectContent();
	final String? grade = jsonConvert.convert<String>(json['grade']);
	if (grade != null) {
		listProblemCollectContent.grade = grade;
	}
	final String? groupId = jsonConvert.convert<String>(json['groupId']);
	if (groupId != null) {
		listProblemCollectContent.groupId = groupId;
	}
	final String? isLimit = jsonConvert.convert<String>(json['isLimit']);
	if (isLimit != null) {
		listProblemCollectContent.isLimit = isLimit;
	}
	final String? limitDay = jsonConvert.convert<String>(json['limitDay']);
	if (limitDay != null) {
		listProblemCollectContent.limitDay = limitDay;
	}
	final String? memberStatus = jsonConvert.convert<String>(json['memberStatus']);
	if (memberStatus != null) {
		listProblemCollectContent.memberStatus = memberStatus;
	}
	final String? taskStatus = jsonConvert.convert<String>(json['taskStatus']);
	if (taskStatus != null) {
		listProblemCollectContent.taskStatus = taskStatus;
	}
	final String? taskTitle = jsonConvert.convert<String>(json['taskTitle']);
	if (taskTitle != null) {
		listProblemCollectContent.taskTitle = taskTitle;
	}
	final String? totalProblem = jsonConvert.convert<String>(json['totalProblem']);
	if (totalProblem != null) {
		listProblemCollectContent.totalProblem = totalProblem;
	}
	final String? writeAuth = jsonConvert.convert<String>(json['writeAuth']);
	if (writeAuth != null) {
		listProblemCollectContent.writeAuth = writeAuth;
	}
	final String? memberRole = jsonConvert.convert<String>(json['memberRole']);
	if (memberRole != null) {
		listProblemCollectContent.memberRole = memberRole;
	}
	return listProblemCollectContent;
}

Map<String, dynamic> $ListProblemCollectContentToJson(ListProblemCollectContent entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['grade'] = entity.grade;
	data['groupId'] = entity.groupId;
	data['isLimit'] = entity.isLimit;
	data['limitDay'] = entity.limitDay;
	data['memberStatus'] = entity.memberStatus;
	data['taskStatus'] = entity.taskStatus;
	data['taskTitle'] = entity.taskTitle;
	data['totalProblem'] = entity.totalProblem;
	data['writeAuth'] = entity.writeAuth;
	data['memberRole'] = entity.memberRole;
	return data;
}